import axios from "axios";
import { Admin } from '@/api';

// 账户信息
const load_profile = async (context, payload) => {
    let { status,msg, data } = await Admin.info(payload);
    if (status) {
        context.commit("UPDATE_PROFILE", data);
    }
    return {status,msg,data}
}

const edit_profile = async (context, payload) => {
    let { status, msg } = await Admin.account(payload);
    if (status) {
        context.commit("UPDATE_PROFILE", payload);
    }
    return {status,msg}
}

export default {
    load_profile,
    edit_profile
}